<?php
require('../database/db.php');
$mysql=new mysql();
$state = 0;
$state3 = 3;

if ($_REQUEST[userid]!='') {
	$sql = "update car set state='".$state."' where userid='".$_REQUEST[userid]."' and state='".$state3."'";
	if ($mysql->query($sql)) {
		$arr = array('code' => 100, 'tip' =>'更新成功');
	}else{
		$arr = array('code' => 200, 'tip' =>'更新失败');
	}	
}else{
	$arr = array('code' => 300, 'tip' =>'需要传入参数:用户id=>userid');
}

echo json_encode($arr);